package us.cirion.adventure.engine.result;

import us.cirion.adventure.engine.GameDisplay;
import us.cirion.adventure.engine.Result;

/**
 * EndGame will cease further execution of the current game. It is appropriate
 * to invoke this when the player wins, loses, or quits the game. The interface
 * can determine what should happen next; the application may exit entirely, or
 * the player may be returned to a main menu or other screen.
 * 
 * @author Chris
 */
public class EndGame implements Result
{

	private GameDisplay display;

	/**
	 * Constructs a command to end the game.
	 * 
	 * @param display The user interface that will be notified of the game
	 *            ending.
	 */
	public EndGame(GameDisplay display)
	{
		this.display = display;
	}

	/**
	 * Ends the game.
	 */
	public void execute()
	{
		display.endGame();
	}

}
